package org.example.service;

import org.example.commonapi.domain.Practice;
import org.example.commonapi.domain.R;
import org.example.commonapi.domain.Suggestion;
import org.example.commonapi.domain.User;
import org.example.commonapi.domain.Video;
import org.example.commonapi.dto.LoginInfo;
import org.example.commonapi.vo.CourseVO;
import org.example.commonapi.vo.StatisticVO;
import org.example.commonapi.vo.VideoVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

public interface AdminService {
    User login(String username, String password);

    Long register(LoginInfo loginInfo);

    R<User> getNowUserInfo(HttpServletRequest request);

    R<List<User>> adminGetUserInfo(Integer role);

    R<List<User>> schoolGetUserInfo(HttpServletRequest request, Integer role);

    R<List<CourseVO>> schoolGetCourseInfo(HttpServletRequest request);

    R<List<VideoVO>> schoolGetVideoInfo(HttpServletRequest request);

    R<List<CourseVO>> adminGetCourseInfo();

    R<List<VideoVO>> adminGetVideoInfo();

    R<List<Practice>> getMaxVisitPractice(HttpServletRequest request, Integer role);

    R<List<Video>> getMaxPlayCountVideo(HttpServletRequest request, Integer role);

    R<List<Integer>> getTodayUserInfo(HttpServletRequest request, Integer role);

    R<List<StatisticVO>> getStatisticData(HttpServletRequest request, Integer role);

    void updateStatistic();

    R importExcelUser(HttpServletRequest request, MultipartFile file, Integer role) throws IOException;

    R<List<Suggestion>> getUserSuggestion();

    R<List<Double>> getTaskDetail(HttpServletRequest request, Integer role);
}
